﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CustomerMaster.master" AutoEventWireup="true" CodeBehind="HistoryOrders.aspx.cs" Inherits="EHTWebsiteProject.HistoryOrders" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentView" runat="server">
    <div align="left" style="padding:0px">
    <h1>
        <asp:Label ID="lbCustomerHistoryOfOrder" runat="server" Text="History Of Order"></asp:Label>
    </h1>
     <table style="width: 100%; height: 50px;">
        <tr>
            <td>
                <a id="Order_1" href="HistoryOrders.aspx?OrderState=1">Orders Appending</a>
            </td>
            <td style="text-align: right; padding-right: 10px">
                <a id ="Order_2" href="HistoryOrders.aspx?OrderState=2">Shiping Orders</a>
            </td>
            <td style="text-align: right; padding-right: 10px">
                <a id="Order_3" href="HistoryOrders.aspx?OrderState=3">Shipped Orders</a>
            </td>
            <td style="text-align: right; padding-right: 10px">
                <a id ="Order_4" href="HistoryOrders.aspx?OrderState=-1">All Orders</a>
            </td>
        </tr>
    </table>
     <asp:GridView ID="grdData" runat="server" AutoGenerateColumns="false" Width="100%" 
                HeaderStyle-Height="26px" BorderColor="#b7d0d4" 
                HeaderStyle-BackColor="#ff6600" HeaderStyle-ForeColor="#ffffff"
                AllowPaging="true" PageSize="8"
                onpageindexchanging="grdData_PageIndexChanging"
                >
        <Columns >
           
            <asp:TemplateField HeaderText="OrderNo" ItemStyle-Width="50" ItemStyle-HorizontalAlign="left" ItemStyle-Font-Bold="true" HeaderStyle-Font-Names="Tahoma" HeaderStyle-Font-Size="12px"   ItemStyle-Font-Names="Tahoma" ItemStyle-Font-Size="12px" ItemStyle-ForeColor="#43433d">
                <ItemTemplate>
                    <div runat="server" id="Name"><%# DataBinder.Eval(Container.DataItem, "OrderID")%></a></div>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Full Name" ItemStyle-Width="200" ItemStyle-HorizontalAlign="left" ItemStyle-Font-Bold="true" HeaderStyle-Font-Names="Tahoma" HeaderStyle-Font-Size="12px"   ItemStyle-Font-Names="Tahoma" ItemStyle-Font-Size="12px" ItemStyle-ForeColor="#43433d">
                <ItemTemplate>
                    <div runat="server" id="Name"><a href ="OrderDetails.aspx?oid=<%# DataBinder.Eval(Container.DataItem, "OrderID")%>"><%# DataBinder.Eval(Container.DataItem, "ReceivedName")%></a></div>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Address" ItemStyle-Width="300" ItemStyle-HorizontalAlign="left" ItemStyle-Font-Bold="true" HeaderStyle-Font-Names="Tahoma" HeaderStyle-Font-Size="12px"   ItemStyle-Font-Names="Tahoma" ItemStyle-Font-Size="12px" ItemStyle-ForeColor="#43433d">
                <ItemTemplate>
                    <div runat="server" id="Name"><%# DataBinder.Eval(Container.DataItem, "ReceivedAddress")%></div>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Phone" ItemStyle-Width="100" ItemStyle-HorizontalAlign="left" ItemStyle-Font-Bold="true" HeaderStyle-Font-Names="Tahoma" HeaderStyle-Font-Size="12px"   ItemStyle-Font-Names="Tahoma" ItemStyle-Font-Size="12px" ItemStyle-ForeColor="#43433d">
                <ItemTemplate>
                    <div runat="server" id="Name"><%# DataBinder.Eval(Container.DataItem, "ReceicedPhone")%></div>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Created Date" ItemStyle-Width="300" ItemStyle-HorizontalAlign="left" ItemStyle-Font-Bold="true" HeaderStyle-Font-Names="Tahoma" HeaderStyle-Font-Size="12px"   ItemStyle-Font-Names="Tahoma" ItemStyle-Font-Size="12px" ItemStyle-ForeColor="#43433d">
                <ItemTemplate>
                    <div runat="server" id="Name"><%# DataBinder.Eval(Container.DataItem, "CreatedDate")%></div>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Require Date" ItemStyle-Width="300" ItemStyle-HorizontalAlign="left" ItemStyle-Font-Bold="true" HeaderStyle-Font-Names="Tahoma" HeaderStyle-Font-Size="12px"   ItemStyle-Font-Names="Tahoma" ItemStyle-Font-Size="12px" ItemStyle-ForeColor="#43433d">
                <ItemTemplate>
                    <div runat="server" id="Name"><%# DataBinder.Eval(Container.DataItem, "RequireDate")%></div>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <PagerSettings Mode="Numeric" Position="TopAndBottom" />
    </asp:GridView>
  </div>
</asp:Content>
